#include <windows.h>
#include <utillib/util/TimeEstimate.h>

using namespace utillib::util;

TimeEstimate::TimeEstimate()
{
	QueryPerformanceFrequency( ( LARGE_INTEGER * )&m_frequence ); 
}

TimeEstimate::~TimeEstimate()
{
}

void TimeEstimate::start()
{
	QueryPerformanceCounter( ( LARGE_INTEGER * )&m_start );
}

void TimeEstimate::finish()
{
	QueryPerformanceCounter( ( LARGE_INTEGER * )&m_finish );
}

long int TimeEstimate::getTimeEstimate()
{
	return ( long int ) ( ( m_finish - m_start ) * 1000 / m_frequence );
}

